﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Agr.CQRS.Infrastructure.Orm;
using NHibernate.Criterion;

namespace Agr.CQRS.Infrastructure.Events
{
    class QueryGetEventsFromId : CriteriaQuery<StoredDomainEvent>
    {
        public QueryGetEventsFromId()
        {
            Criteria.AddOrder(Order.Asc("Id"));
        }

        public QueryGetEventsFromId FromAndWithout(int id)
        {
            Criteria.Add(Expression.Gt("Id", id));
            return this;
        }

    }
}
